The present invention generally relates to a storage apparatus and a method of managing data in a storage apparatus, and particularly relates to technology for managing cache data in such a storage apparatus.
A storage apparatus (which may be called a storage subsystem) generally comprises a cache memory in view of system performance and the like. A cache memory is typically configured from a volatile memory such as a DRAM. A large-scale storage apparatus equipped with large-capacity hard disk drives is mounted with a large-capacity cache memory in the order of several to several tens of gigabytes, and thus, during its operation, caches data therein and replies to I/O access requests to a host system. Accordingly, such a storage apparatus, in order to prevent the loss of data in the cache memory due to an unexpected power shutdown, temporarily supply power from a battery as a secondary power source to maintain the operating condition during an unexpected power shutdown, while data in the cache memory is destaged to (backed up in) a hard disk drive.
In recent years, enlargement of capacity and price-reduction of nonvolatile memories such as a flash memory have progressed, and, as a result, the usage of nonvolatile memories is growing. For example, Japanese Patent Laid-Open Publication No. H6-236241 (Patent Document 1) discloses a hard disk device in which a cache memory is partially configured from a flash memory. In other words, with Patent Document 1, data in an area that is frequently accessed in the hard disk is placed in the flash memory. Patent Document 1 thereby eliminates the movement of the disk head as much as possible upon accessing data access, increases the access efficiency, and prevents the loss of cache data due to a power shutdown.
Further, Japanese Patent Laid-Open Publication No. H10-154101 (Patent Document 2) discloses a data storage system that causes a semiconductor disk device configured from EEPROM to function as a cache memory for a hard disk drive. Specifically, with Patent Document 2, information required for booting the operating system and frequently used application programs is stored in the semiconductor disk device, and the cache function is thereby effectively exhibited even immediately after the power is turned on.
With a large-scale storage apparatus, during its operation, large volumes of data exist in the cache memory without being destaged to the hard disk drive. Accordingly, it is necessary to prepare measures so that data is not lost even during emergencies such as a power shutdown.
With the conventional data backup system during emergencies using a battery, the storage apparatus has needed to be equipped with a considerable load of batteries, which are relatively expensive, in order to continue driving the hard disk drive, and costs tended to pile up. Thus, it is necessary to reduce the power consumption as low as possible in order to prolong the drive with a small load of batteries, but it is difficult to effectively reduce the power consumption since the backup destination of data is set to be the hard disk drive.
Further, nonvolatile memories as represented with a flash memory have a limited deletion/rewrite count in a block (area) because of its structure. Thus, when a nonvolatile memory is to be used as a cache memory of a hard disk drive to which a write access is frequently made, it is necessary to control the write access so that it will not be concentrated on a specific block. Accordingly, as a real issue, it is difficult to actively use a nonvolatile memory as the cache memory in the storage apparatus.
Furthermore, even in a case where the cache memory is partially configured from a nonvolatile memory, there is a problem in that the data stored in a volatile cache memory would be lost unless it is backed up in a hard disk drive during emergencies such as a power shutdown. Thus, if data stored in a volatile cache memory is backed up in a hard disk drive during emergencies such as a power shutdown, this would ultimately result in the problem of power consumption encountered in a conventional battery backup system.